package com.winit.schedule.job.tracker.repository.mysql.dao;

import java.util.List;

import com.winit.schedule.core.repository.entity.QuartzJobEntity;
import com.winit.schedule.core.repository.query.QuartzJobQuery;
import com.winit.schedule.job.tracker.repository.mysql.plugin.SearchRequest;

public interface MysqlQuartzJobDao {

    void saveJob(QuartzJobEntity entity);

    void updateJobStatus(QuartzJobEntity entity);

    void updateJobCommand(QuartzJobEntity entity);

    QuartzJobEntity getJobByCompositeKey(QuartzJobEntity entity);

    List<QuartzJobEntity> queryJobPage(SearchRequest<QuartzJobQuery> search);

    long queryJobPageCount(QuartzJobQuery query);

    void deleteJobsByTaskTrackerUuid(String taskTrackerUuid);

    void cleanCommandByTaskTrackerUuid(String taskTrackerUuid);

    List<QuartzJobEntity> queryJobCommnads(String taskTrackerUuid);
    
    public void deleteJobTimeout(long timeout);

}
